package last.code.square;

import java.math.BigDecimal;
import java.util.Scanner;

public class Double {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        BigDecimal num = new BigDecimal(n);
        for (int i = 1; i < n; i++) {
            for (int j = i; j < n; j++) {
                BigDecimal bd = new BigDecimal(i).multiply(new BigDecimal(i)).add(new BigDecimal(j).multiply(new BigDecimal(j)));
                if (bd.equals(num)) {
                    System.out.println(i + "," + j);
                    return;
                }
            }
        }
        System.out.println("-1");
    }
}
